package com.ruoyi.tuanzhang.domain.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 带货评分信息 /api/authorStatData/authorReputationDetail
 */
@NoArgsConstructor
@Data
public class DarenHomeScoreDataDto {

    @JsonProperty("st")
    private Integer st;
    @JsonProperty("code")
    private Integer code;
    @JsonProperty("msg")
    private String msg;
    @JsonProperty("extra")
    private ExtraDTO extra;
    @JsonProperty("data")
    private DataDTO data;

    @NoArgsConstructor
    @Data
    public static class ExtraDTO {
        @JsonProperty("now")
        private Long now;
        @JsonProperty("log_id")
        private String logId;
    }

    @NoArgsConstructor
    @Data
    public static class DataDTO {
        @JsonProperty("score_list")
        private List<ScoreListDTO> scoreList;
        // 得分打败x%的人
        @JsonProperty("percentage")
        private Double percentage;
        // 商品评分
        @JsonProperty("goods_score")
        private GoodsScoreDTO goodsScore;
        // 服务得分
        @JsonProperty("service_score")
        private ServiceScoreDTO serviceScore;

        @JsonProperty("logistics_score")
        private LogisticsScoreDTO logisticsScore;
        // 具体得分
        @JsonProperty("item_scores")
        private List<ItemScoresDTO> itemScores;

        @NoArgsConstructor
        @Data
        public static class GoodsScoreDTO {
            @JsonProperty("score")
            private Double score;
            @JsonProperty("rating")
            private String rating;

            @JsonProperty("percentage")
            private String percentage;
        }

        @NoArgsConstructor
        @Data
        public static class ServiceScoreDTO {
            @JsonProperty("score")
            private Double score;
            @JsonProperty("rating")
            private String rating;
            @JsonProperty("percentage")
            private String percentage;
        }

        @NoArgsConstructor
        @Data
        public static class LogisticsScoreDTO {
            // 分数
            @JsonProperty("score")
            private Double score;
            // 得分评价
            @JsonProperty("rating")
            private String rating;

            @JsonProperty("percentage")
            private String percentage;
        }

        @NoArgsConstructor
        @Data
        public static class ScoreListDTO {
            @JsonProperty("date")
            private String date;
            @JsonProperty("score")
            private String score;
        }

        @NoArgsConstructor
        @Data
        public static class ItemScoresDTO {
            @JsonProperty("score")
            private String score;
            @JsonProperty("rating")
            private String rating;
            @JsonProperty("percentage")
            private String percentage;
            @JsonProperty("name")
            private String name;
        }
    }
}
